-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #7138: Suspend callers of macros compiled in the same run #7324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
23344d6
to
33178b0
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I tried converting all |
1f529ef
to
f1be00f
Compare
e436d28
to
4317e7c
Compare
@liufengyun the commits from @odersky LGTM but you should have a second look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
While the utility enabled by the PR is doubtless, this PR makes it easier to write code that has subtle dependencies than before. The current error messages may not be helpful enough to resolve cyclic compilation errors, which may hurt usability.
What about putting the feature under a compiler flag?
@liufengyun the incremental compilation example actually works (or fails as expected). The incremental compiler trigger recompilation of |
This reverts commit 8cea720.
To avoid a compiler crash.
ec84403
to
4f59892
Compare
rebased to fix conflicts |
Allows macros to be defined and called in the same project. The idea is to suspend
the callers of a macro (and their upstream dependencies), compile the sourcefile(s)
containing the macro(s), and then compile the suspended files in a second run.
The scheme detects and flags as errors calls to macros in the same file and mutual
dependencies between different files which would not work with suspensions.
It needs to be complemented by another mechanism that checks that class files loaded
by a macro class loader do not have associated source files that are currently compiled.